package com.ruoyi.web.controller.app;

import com.ruoyi.order.domain.app.Vo.AddressVo;
import com.ruoyi.order.mapper.ProvinceCityDistrictMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/app")
public class AddressAppController {
    @Resource
    private ProvinceCityDistrictMapper provinceCityDistrictMapper;


    @RequestMapping("/p/area/listByPid")
    @ResponseBody
    public List<AddressVo> getAddress(String pid){
        Map map = new HashMap();
        // TODO: 2022/2/9 userId 登录情况下获取，测试数据 为 null
        List<AddressVo>  userAddressVos = provinceCityDistrictMapper.selectByPID(pid);
        return userAddressVos;

    }

}
